﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _051
{
    internal class Program
    {
        static unsafe void Main(string[] args)
        {
            double f = 3.1415;
            double* b = &f;
            Console.WriteLine("数据的内容是：{0}",f);
            Console.WriteLine("数据在内存中的地址是：{0}", (int)b) ;

            unsafe
            {
                int var = 12345;
                int* p = &var;
                Console.WriteLine("变量var的值为：{0}",var);
                Console.WriteLine("指针p指向的值为：{0}", p->ToString()) ;
                Console.WriteLine("指针p的值为：{0}",(int)p);
            }
            Console.ReadKey();
        }
    }
}
